/*
 * RiconoscimentoPalla.h
 */


#ifndef RICONOSCIMENTOPALLA_H_
#define RICONOSCIMENTOPALLA_H_

#include <libfreenect.hpp>
#include <iostream>
#include <vector>
#include <cmath>
#include <math.h>
#include <pthread.h>
#include <opencv/cv.h>
#include <opencv2/opencv.hpp>
#include <opencv/cxcore.h>
#include <opencv/highgui.h>
//Lettieri: infPalla=Scalar(170,100,40);
	//Lettieri:*/ supPalla=Scalar(180,255,255);
	//Lettieri: infPorta=Scalar(100,50,10);
	//Lettieri: supPorta=Scalar(120,255,255);
#define MIN_AREA_PALLA 1000
/*#define MIN_H_PALLA 0
#define SUP_H_PALLA 6
#define MIN_S_PALLA 162
#define SUP_S_PALLA 255
#define MIN_V_PALLA 26
#define SUP_V_PALLA 142*/
#define MIN_H_PALLA 0
#define SUP_H_PALLA 13
#define MIN_S_PALLA 195

#define SUP_S_PALLA 255
#define MIN_V_PALLA 0
#define SUP_V_PALLA 255

using namespace cv;
using namespace std;
class RiconoscimentoPalla {


public:
    RiconoscimentoPalla();
    ~RiconoscimentoPalla();
    Point riconoscimento_palla(Mat rgbMat,Mat img_palla_filt2);
	unsigned short calcoloProfonditaPalla(Mat rgbMat, Mat depthMat,Point centroPalla);
	double calcoloAngoloPalla(Mat rgbMat, CvPoint centroPalla);

};

#endif
